qw=new Object();
qw.credits="Made by dario2994... noone else, so if someone say he has done this is saying a lie ;)";
/*SET OPTIONS*/
qw.option=
{
	/*This options will be overwritten by the parameters of the function called if there are*/
	
	"openingtime":500,/*INTEGER time in milliseconds to open a window*/
	"openingpassages":20,/*INTEGER passages to open a window*/
	"closingtime":500,/*INTEGER time in milliseconds to close a window*/
	"closingpassages":20,/*INTEGER passages to close a window*/
	"loadingwait":true,/*true/false If the window is opened only after the load is complete*/
	"bgvisibility":true,/*true/false Whether the background is visible or not*/
	"bgopacity":60,/*PERCENTAGE How much the background is opaque, 100 is the maximum value*/
	"openObject":0,/*STRING&&DOM-element Element from where the window opens, write it in brackets, if you want to use openCoordinates instead of this set to 0*/
	"openCoordinateX":500,/*INTEGER The coordinate X in pixel(top=0;bottom=maxValue)from where the window must open (if openObject is setted you can omit this)*/
	"openCoordinateY":500,/*INTEGER The coordinate Y in pixel(left=0;right=maxValue)from where the window must open (if openObject is setted you can omit this)*/
	"color1":"black",/*HTML-COLOR background color of the window*/
	"color2":"#222222",/*HTML-COLOR border color and header color of the window*/
	"color3":"white",/*HTML-COLOR color of the title of the window*/
	"color4":"white",/*HTML-COLOR color of the content of the window if it's text-type*/
	"color5":"#888888",/*HTML-COLOR color of the move & close button*/
	"color6":"blue",/*HTML-COLOR color of the background*/
	"color7":"white",/*HTML-COLOR color of the loading image*/
	"type":"text", /*STRING type of the windows: text,iframe,flash,img*/
	"title":"Quick-window by dario2994",/*STRING title of the window*/
	"content":"Standard content",/*STRING content of the windows if they are text-type*/
	"src":"http://www.google.com/",/*STRING link to a web-site, an image, a flash file*/
	"width":500,/*INTEGER width of the window in pixel*/
	"height":500/*INTEGER height of the window in pixel*/
};
/*FINISH OPTIONS*/
qw.divinfo=new Array();
qw.divimportantinfo=
{
	"moving":null,
	"scrolling":null
};
qw.browser=function()
{
	if(document.compatMode && document.compatMode=="BackCompat"){"quirk"}else{"strict"}
	if(/Firefox\/3/.test(window.navigator.userAgent)){return("ff3");}
	if(/Firefox\/2/.test(window.navigator.userAgent)){return("ff2");}
	if(/Chrome/.test(window.navigator.userAgent)){return("gc");}
	if(/Opera/.test(window.navigator.userAgent)){return("O");}
	if(/Safari/.test(window.navigator.userAgent)){return("sa");}
	if(/MSIE/.test(window.navigator.userAgent)){return("ie");}
	if(/Konqueror/.test(window.navigator.userAgent)){return("kde");}
	return(false);
};
qw.eventListener=function(type,object,handler,f)
{
	if(type=="add")
	{
		if(document.attachEvent==undefined)
		{
			object.addEventListener(handler,f,false);
		}
		else
		{
			object.attachEvent("on"+handler,f);
		}
	}
	else
	{
		if(document.attachEvent==undefined)
		{
			object.removeEventListener(handler,f,false);
		}
		else
		{
			object.detachEvent("on"+handler,f);
		}
	}
};
qw.getElementsByClassName = function (className, elm)
{
	if (document.getElementsByClassName) 
	{
		return(elm.getElementsByClassName(className)[0]);
	}
	else 
	{
		var elements = (elm.all)? elm.all : elm.getElementsByTagName("*");
		for(var l=0; l<elements.length; l++)
		{
			if (elements[l].className==className) 
			{
				return(elements[l]);
			}
		}
	}
};
qw.width=function()
{
	return(window.innerWidth||document.body.clientWidth);
}
qw.height=function()
{
	return(window.innerHeight||document.body.clientHeight);
}
qw.catchPosition=function(obj)
{
	var left=0;
	var top=0;
	while(obj.tagName!="BODY")
	{
		left += obj.offsetLeft-obj.scrollLeft;
		top += obj.offsetTop-obj.scrollTop;
		if(/O/.test(qw.browser())){left+=obj.scrollLeft;top+=obj.scrollTop;}
		var obj = obj.offsetParent;
	}
	return({"left":left+obj.offsetLeft,"top":top+obj.offsetTop});
};
qw.catchId=function(obj)
{
	if(obj.className=="qw_basicdiv"){return(parseInt(obj.id.replace(/[^\d]/g,"")))}
	return(qw.catchId(obj.parentNode));
}
qw.centerPosition=function(x,y,w,h)
{
	return({"x":x+w/2,"y":y+h/2});
};
qw.cornerPosition=function(x,y,w,h)
{
	return({"x":x-w/2,"y":y-h/2});
};
qw.evaluatePosition=function(x,y,width,height)
{
	document.body.scrollTop
	if(x<(5+document.body.scrollLeft))
	{
		var x=5+document.body.scrollLeft;
	}
	else if(x+width+30>qw.width()+document.body.scrollLeft)
	{
		var x=qw.width()+document.body.scrollLeft-width-30;
	}
	if(y<(5+document.body.scrollTop))
	{
		var y=5+document.body.scrollTop;
	}
	else if(y+height+30>qw.height()+document.body.scrollTop)
	{
		var y=qw.height()+document.body.scrollTop-height-30;
	}
	return({"x":x,"y":y});
};
qw.organizezindex=function(e)
{
	var div$=qw.divinfo;
	var zindex=new Array();
	var wrongdiv=10000+parseInt(div$.length);
	var i=0;
	var moving=!!(qw.divimportantinfo.moving);
	if(e)
	{	
		document.getElementById("qw_number"+qw.catchId((e.target)?(e.target):(e.srcElement))).style.zIndex=div$.length+10001;
	}
	for(i=0;i<div$.length;i++)
	{
		zindex[i]=div$[i].div().style.zIndex;
	}
	zindex=zindex.sort();
	for(i=0;i<div$.length;i++)
	{
		if(zindex[i]!=i+10001)
		{
			wrongdiv=i+10001;
			i=div$.length;
		}
	}
	for(i=0;i<div$.length;i++)
	{
		div$[i].div().style.zIndex-=(div$[i].div().style.zIndex>wrongdiv)?(1):(0);
		if(div$[i].div().style.zIndex==div$.length+10000 && !(moving))
		{
			div$[i].testDiv().style.display="none";
		}
		else
		{
			div$[i].testDiv().style.display="block";
		}
	}
};
qw.resizeBg=function()
{
	qw.divimportantinfo.scrolling.style.height="100%";
	qw.divimportantinfo.scrolling.style.width="100%";
	qw.divimportantinfo.scrolling.style.height=document.body.scrollHeight;
	qw.divimportantinfo.scrolling.style.width=document.body.scrollWidth;
};
qw.stopAll=function(e)
{
	(e.preventDefault)?(e.preventDefault()):(e.returnValue = false)
	return(false);
}
qw.evaluateFunctionParameters=function(variable,type)
{
	var result=false;
	if(type=="string")
	{
		if(variable && typeof(variable)=="string"){result=true;}
	}
	
	else if(type=="number")
	{
		if(variable && typeof(variable)=="number"){result=true;}
	}
	else if(type=="percentage")
	{
		if(variable && typeof(variable)=="number" && variable>=0 && variable<=100){result=true;}
	}
	else if(type=="expreg")
	{
		if(variable && typeof(variable)=="string" && variable.match(/(iframe|text|flash|image|pdf)/)!=null && variable.match(/(iframe|text|flash|image|pdf)/)[0] == variable){result=true;}
	}
	else if(type=="color")
	{
		var color=new Array("aqua", "black", "blue", "fuchsia", "gray", "green", "lime", "maroon", "navy", "olive", "purple", "red", "silver", "teal", "white", "yellow");
		for(var i=0;i<color.length;i++)
		{
			if(variable==color[i]){result=true;i=1000;}
		}
		if(variable && variable.match(/\#?[a-zA-Z\d]{6}/)==variable){result=true;}
	}
	else if(type=="true/false")
	{
		if(typeof(variable)=="boolean")
		{
			result=true;
		}
	}
	return(result);
};
qw.template=function(obj1,id,div)
{
	this.id=id;
	if(qw.evaluateFunctionParameters(obj1.openingtime,"number"))
	{
		this.openingtime=obj1.openingtime;
	}
	else
	{
		this.openingtime=qw.option.openingtime;
	}
	if(qw.evaluateFunctionParameters(obj1.closingtime,"number"))
	{
		this.closingtime=obj1.closingtime;
	}
	else
	{
		this.closingtime=qw.option.closingtime;
	}
	if(qw.evaluateFunctionParameters(obj1.openingpassages,"number"))
	{
		this.openingpassages=obj1.openingpassages;
	}
	else
	{
		this.openingpassages=qw.option.openingpassages;
	}
	if(qw.evaluateFunctionParameters(obj1.closingpassages,"number"))
	{
		this.closingpassages=obj1.closingpassages;
	}
	else
	{
		this.closingpassages=qw.option.closingpassages;
	}
	if(qw.evaluateFunctionParameters(obj1.loadingwait,"true/false"))
	{
		this.loadingwait=obj1.loadingwait;
	}
	else
	{
		this.loadingwait=qw.option.loadingwait;
	}
	if(qw.evaluateFunctionParameters(obj1.bgvisibility,"true/false"))
	{
		this.bgvisibility=obj1.bgvisibility;
	}
	else
	{
		this.bgvisibility=qw.option.bgvisibility;
	}
	if(qw.evaluateFunctionParameters(obj1.bgopacity,"percentage"))
	{
		this.bgopacity=obj1.bgopacity;
	}
	else
	{
		this.bgopacity=qw.option.bgopacity;
	}
	if(obj1.openObject&&typeof(obj1.openObject)=="object")
	{
		this.openObject=obj1.openObject;
	}
	else if(eval(qw.option.openObject)&&typeof(eval(qw.option.openObject))=="object")
	{
		this.openObject=eval(qw.option.openObject);
	}	
	else if(qw.evaluateFunctionParameters(obj1.openCoordinateX,"number")&&qw.evaluateFunctionParameters(obj1.openCoordinateY,"number"))
	{
		this.openObject=new Object();
		this.openObject.tagName="BODY";
		this.openObject.offsetLeft=obj1.openCoordinateX;
		this.openObject.offsetTop=obj1.openCoordinateY;
		this.openObject.offsetWidth=0;
		this.openObject.offsetHeight=0;
	}
	else
	{
		this.openObject=new Object();
		this.openObject.tagName="BODY";
		this.openObject.offsetLeft=qw.option.openCoordinateX;
		this.openObject.offsetTop=qw.option.openCoordinateY;
		this.openObject.offsetWidth=0;
		this.openObject.offsetHeight=0;
	}
	if(qw.evaluateFunctionParameters(obj1.color1,"color"))
	{
		this.color1=obj1.color1;
	}
	else
	{
		this.color1=qw.option.color1;
	}
	if(qw.evaluateFunctionParameters(obj1.color2,"color"))
	{
		this.color2=obj1.color2;
	}
	else
	{
		this.color2=qw.option.color2;
	}
	if(qw.evaluateFunctionParameters(obj1.color3,"color"))
	{
		this.color3=obj1.color3;
	}
	else
	{
		this.color3=qw.option.color3;
	}
	if(qw.evaluateFunctionParameters(obj1.color4,"color"))
	{
		this.color4=obj1.color4;
	}
	else
	{
		this.color4=qw.option.color4;
	}
	if(qw.evaluateFunctionParameters(obj1.color5,"color"))
	{
		this.color5=obj1.color5;
	}
	else
	{
		this.color5=qw.option.color5;
	}
	if(qw.evaluateFunctionParameters(obj1.color6,"color"))
	{
		this.color6=obj1.color6;
	}
	else
	{
		this.color6=qw.option.color6;
	}
	if(qw.evaluateFunctionParameters(obj1.color7,"color"))
	{
		this.color7=obj1.color7;
	}
	else
	{
		this.color7=qw.option.color7;
	}
	if(qw.evaluateFunctionParameters(obj1.type,"expreg"))
	{
		this.type=obj1.type;
	}
	else
	{
		this.type=qw.option.type;
	}
	if(qw.evaluateFunctionParameters(obj1.title,"string"))
	{
		this.title=obj1.title;
	}
	else
	{
		this.title=qw.option.title;
	}
	if(qw.evaluateFunctionParameters(obj1.src,"string"))
	{
		this.src=obj1.src;
	}
	else
	{
		this.src=qw.option.src;
	}
	if(qw.evaluateFunctionParameters(obj1.content,"string"))
	{
		this.content=obj1.content;
	}
	else
	{
		this.content=qw.option.content;
	}
	if(qw.evaluateFunctionParameters(obj1.width,"number"))
	{
		this.width=(obj1.width+35<qw.width())?(obj1.width):(qw.width()-35);
	}
	else
	{
		this.width=qw.option.width;
	}
	if(qw.evaluateFunctionParameters(obj1.height,"number"))
	{
		this.height=(obj1.height+35<qw.height())?(obj1.height):(qw.height()-35);
	}
	else
	{
		this.height=qw.option.height;
	}
};
qw.template.prototype.setSize=function(w,h)
{
	this.div().style.width=w+"px";
	this.div().style.height=h+"px";
};
qw.template.prototype.setPosition=function(x,y)
{
	this.div().style.left=x+"px";
	this.div().style.top=y+"px";
};
qw.template.prototype.div=function()
{
	return(document.getElementById("qw_number"+this.id));
};
qw.template.prototype.testDiv=function()
{
	return(qw.getElementsByClassName("qw_usefuldivtomove", this.div()));
};
qw.template.prototype.contentDiv=function()
{
	return(qw.getElementsByClassName("qw_contentdiv", this.div()));
};
qw.template.prototype.titleDiv=function()
{
	return(qw.getElementsByClassName("qw_headdiv", this.div()));
};
qw.openEvent=function(info,openObject)
{
	var numberdiv=qw.divinfo.length;
	if(!info){info=new Object();}
	info.openObject=openObject;
	qw.divinfo[numberdiv]=new qw.template(info,numberdiv);
	var div$=qw.divinfo[numberdiv];
	if(!(qw.divimportantinfo.scrolling))
	{
		var movingdiv=document.createElement("div");
			movingdiv.id="qw_divbackground";
			movingdiv.style.position="absolute";
			movingdiv.style.left="0px";
			movingdiv.style.top="0px";
			movingdiv.style.padding="0px";
			movingdiv.style.margin="0px";
			movingdiv.style.Zindex=10000;
		document.body.appendChild(movingdiv);
		qw.divimportantinfo.scrolling=movingdiv;
	}
	qw.divimportantinfo.scrolling.style.backgroundColor=div$.color6;
	qw.divimportantinfo.scrolling.style.opacity=div$.bgopacity/100;
	qw.divimportantinfo.scrolling.style.visibility=(div$.bgvisibility)?("visible"):("hidden");
	qw.resizeBg();
	var basicdiv=document.createElement("div");
		qw.eventListener("add",basicdiv,"mousedown",qw.organizezindex);
		basicdiv.style.zIndex=parseInt(numberdiv)+10001;
		basicdiv.style.backgroundColor=div$.color1;
		basicdiv.style.border="3px "+div$.color2+" solid";
		basicdiv.style.width="0px";
		basicdiv.style.height="0px";
		basicdiv.style.left="-999999px";
		basicdiv.style.top="-999999px";
		basicdiv.style.padding=5;
		basicdiv.className="qw_basicdiv";
		basicdiv.id="qw_number"+numberdiv;
		basicdiv.style.position="absolute";
		var headdiv=document.createElement("div");
			headdiv.className="qw_headdiv";
			headdiv.style.height="23px";
			headdiv.style.display="none";
			headdiv.style.backgroundColor=div$.color2;
			var titlediv=document.createElement("div");
				titlediv.className="qw_titlediv";
				titlediv.style.paddingLeft="12px";
				titlediv.style.fontSize="18px";
				titlediv.style.position="absolute";
				titlediv.style.left="0px";
				titlediv.style.color=div$.color3;
				titlediv.innerHTML=div$.title;
			headdiv.appendChild(titlediv);
			var moveclosediv=document.createElement("div");
				moveclosediv.className="qw_moveclosediv";
				moveclosediv.style.color=div$.color5;
				moveclosediv.style.position="absolute";
				moveclosediv.style.right="0px";
				moveclosediv.style.paddingRight="12px";
				var movediv=document.createElement("div");
					movediv.className="qw_movebutton";
					movediv.innerHTML="MOVE";
					movediv.style.display="inline";
					movediv.style.paddingRight="4px";
					movediv.style.cursor="move";
					qw.eventListener("add",movediv,"mousedown",qw.moveEvent);
				moveclosediv.appendChild(movediv);
				var closediv=document.createElement("div");
					closediv.innerHTML="CLOSE";
					closediv.className="qw_closebutton";
					closediv.style.cursor="pointer";
					closediv.style.display="inline";
					qw.eventListener("add",closediv,"click",qw.closeEvent);
				moveclosediv.appendChild(closediv);
			headdiv.appendChild(moveclosediv);
		basicdiv.appendChild(headdiv);
		var contentdiv=document.createElement("div");
			contentdiv.style.height="auto";
			contentdiv.style.width="auto";
			contentdiv.style.overflow="hidden";
			contentdiv.style.height=div$.height*1-23; /*ERRORE IE*/
			contentdiv.className="qw_contentdiv";
			contentdiv.style.display="none";
			switch(div$.type)
			{
				case "iframe":
					contentdiv.style.textAlign="center";
					if(div$.loadingwait)
					{
						var loading=document.createElement("div");
							loading.style.width="100px";
							loading.style.height="40px";
							loading.style.position="relative";
							loading.style.top=div$.height/2-70+"px";
							loading.style.left=div$.width/2-55+"px";
							var loadingText=document.createElement("div");
								loadingText.style.color=div$.color7;
								loadingText.innerHTML="Loading";
							loading.appendChild(loadingText);
							var loadingImg=document.createElement("div");
								loadingImg.style.width="100px";
								loadingImg.style.height="21px";
								loadingImg.style.border="1px solid "+div$.color7;
								loadingImg.style.padding="1px";
								var load1=document.createElement("div");
									load1.style.width="10px";
									load1.style.height="20px";
									load1.style.position="absolute";
									load1.style.left="30px";
									load1.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load1);
								var load2=document.createElement("div");
									load2.style.width="10px";
									load2.style.height="20px";
									load2.style.position="absolute";
									load2.style.left="20px";
									load2.style.opacity="0.75";
									load2.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load2);
								var load3=document.createElement("div");
									load3.style.width="10px";
									load3.style.height="20px";
									load3.style.position="absolute";
									load3.style.left="10px";
									load3.style.opacity="0.50";
									load3.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load3);
								var load4=document.createElement("div");
									load4.style.width="10px";
									load4.style.height="20px";
									load4.style.position="absolute";
									load4.style.left="0px";
									load4.style.opacity="0.25";
									load4.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load4);
							loading.appendChild(loadingImg);
						contentdiv.appendChild(loading);
						var localLoading=0;
						div$.loadingTime=window.setInterval(
						function()
						{
							load1.style.left=(localLoading*10+30)%100+"px";
							load2.style.left=(localLoading*10+20)%100+"px";
							load3.style.left=(localLoading*10+10)%100+"px";
							load4.style.left=(localLoading*10)%100+"px";
							localLoading++;
						}
						,200);
					}
					var iframe=document.createElement("iframe");
						iframe.style.width="100%";
						iframe.style.height="100%";
						iframe.style.border="none";
						iframe.className="qw_iframenew";
					contentdiv.appendChild(iframe);
						if(div$.loadingwait)
						{
							iframe.style.display="none";
							qw.eventListener("add",iframe,"load",qw.iframeLoadEvent);
						}
						iframe.src=div$.src;
				break;
				case "flash":
					contentdiv.style.textAlign="center";
					var embed=document.createElement("embed");
						embed.src=div$.src;
						embed.type="application/x-shockwave-flash";
						embed.setAttribute("wmode","transparent");
						embed.style.width="100%";
						embed.style.height="100%";
						embed.className="qw_flashembednew";
					contentdiv.appendChild(embed);
				break;
				case "image":
					contentdiv.style.textAlign="center";
					if(div$.loadingwait)
					{
						var loading=document.createElement("div");
							loading.style.width="100px";
							loading.style.height="40px";
							loading.style.position="relative";
							loading.style.top=div$.height/2-70+"px";
							loading.style.left=div$.width/2-55+"px";
							var loadingText=document.createElement("div");
								loadingText.style.color=div$.color7;
								loadingText.innerHTML="Loading";
							loading.appendChild(loadingText);
							var loadingImg=document.createElement("div");
								loadingImg.style.width="100px";
								loadingImg.style.height="21px";
								loadingImg.style.border="1px solid "+div$.color7;
								loadingImg.style.padding="1px";
								var load1=document.createElement("div");
									load1.style.width="10px";
									load1.style.height="20px";
									load1.style.position="absolute";
									load1.style.left="30px";
									load1.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load1);
								var load2=document.createElement("div");
									load2.style.width="10px";
									load2.style.height="20px";
									load2.style.position="absolute";
									load2.style.left="20px";
									load2.style.opacity="0.75";
									load2.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load2);
								var load3=document.createElement("div");
									load3.style.width="10px";
									load3.style.height="20px";
									load3.style.position="absolute";
									load3.style.left="10px";
									load3.style.opacity="0.50";
									load3.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load3);
								var load4=document.createElement("div");
									load4.style.width="10px";
									load4.style.height="20px";
									load4.style.position="absolute";
									load4.style.left="0px";
									load4.style.opacity="0.25";
									load4.style.backgroundColor=div$.color7;
								loadingImg.appendChild(load4);
							loading.appendChild(loadingImg);
						contentdiv.appendChild(loading);
						var localLoading=0;
						div$.loadingTime=window.setInterval(
						function()
						{
							load1.style.left=(localLoading*10+30)%100+"px";
							load2.style.left=(localLoading*10+20)%100+"px";
							load3.style.left=(localLoading*10+10)%100+"px";
							load4.style.left=(localLoading*10)%100+"px";
							localLoading++;
						}
						,200);
					}
					var image=document.createElement("img");
						image.style.width="100%";
						image.style.height="100%";
						image.style.border="none";
						image.className="qw_imagenew";
					contentdiv.appendChild(image);
						if(div$.loadingwait)
						{	
							image.style.display="none";
							qw.eventListener("add",image,"load",qw.iframeLoadEvent);
						}
						image.src=div$.src;
				break;
				case "text"  :
					var textdiv=document.createElement("pre");
						textdiv.style.color=div$.color4;
						textdiv.className="qw_textpre";
						textdiv.innerHTML=div$.content;
					contentdiv.appendChild(textdiv);
				break;
			}
			var testdiv=document.createElement("div");
					testdiv.className="qw_usefuldivtomove";
					testdiv.style.position="relative";
					testdiv.style.top="-"+div$.height+"px";
					testdiv.style.height="100%";
					testdiv.style.width="100%";
					testdiv.style.display="none";
					testdiv.innerHTML=" ";
			contentdiv.appendChild(testdiv);
		basicdiv.appendChild(contentdiv);
	document.body.appendChild(basicdiv);
	qw.organizezindex();
	var temp=0;
	var tempFunctionPosition=qw.catchPosition(div$.openObject);
	var momx=tempFunctionPosition.left+div$.openObject.offsetWidth/2;
	var momy=tempFunctionPosition.top+div$.openObject.offsetHeight/2;
	div$.opening=window.setInterval(function()
	{
		temp++;
		qw.openingDiv(temp,momx,momy,div$);
	},div$.openingtime/div$.openingpassages);
};
qw.moveEvent=function(e)
{
	if((e.button==1&&/(ie)/.test(qw.browser()))||(e.button==0&&!/(ie)/.test(qw.browser())))
	{
		qw.stopAll(e);
		qw.resizeBg();
		qw.divimportantinfo.moving=qw.divinfo[qw.catchId((e.target)?(e.target):(e.srcElement))];
		var div$=qw.divimportantinfo.moving;
		div$.distancex=parseInt(div$.div().style.left)-e.clientX;
		div$.distancey=parseInt(div$.div().style.top)-e.clientY;
		div$.testDiv().style.display="block";
		document.body.style.cursor="move";
		qw.eventListener("add",window,"resize",qw.resizeBg);
		qw.eventListener("add",window,"keydown",qw.stopAll);
		qw.eventListener("add",window,"keypress",qw.stopAll);
		qw.eventListener("add",window,"keyup",qw.stopAll);
		qw.eventListener("add",document,/(ff|kde)/.test(qw.browser())?"DOMMouseScroll":"mousewheel",qw.stopAll);
		qw.eventListener("add",document,"contextmenu",qw.stopAll);
		qw.eventListener("add",document,"mousemove",qw.movingDiv);
		qw.eventListener("add",document,"mouseup",qw.removeMovingData);
	}
};
qw.closeEvent=function(e)
{
	var div$=qw.divinfo[qw.catchId((e.target)?(e.target):(e.srcElement))];
	div$.div().removeChild(div$.contentDiv());
	div$.div().removeChild(div$.titleDiv());
	var temp=div$.closingpassages;
	var momx=qw.catchPosition(div$.openObject).left+div$.openObject.offsetWidth/2;
	var momy=qw.catchPosition(div$.openObject).top+div$.openObject.offsetHeight/2;
	div$.closing=window.setInterval(function()
	{
		temp--;
		qw.closingDiv(temp,momx,momy,div$);
	},div$.closingtime/div$.closingpassages);
};
qw.openingDiv=function(temp,x,y,div$)
{
	if(temp==div$.openingpassages)
	{
		var allinfo=qw.cornerPosition(x,y,div$.width,div$.height);
		var allinfo=qw.evaluatePosition(allinfo.x,allinfo.y,div$.width,div$.height);
		div$.setSize(div$.width,div$.height);
		div$.setPosition(allinfo.x,allinfo.y);
		div$.titleDiv().style.display="block";
		div$.contentDiv().style.display="block";
		clearInterval(div$.opening);
		div$.opening=null;
	}
	else
	{
		var wopen=div$.width/div$.openingpassages*temp;
		var hopen=div$.height/div$.openingpassages*temp;
		var allinfo=qw.cornerPosition(x,y,wopen,hopen);
		var allinfo=qw.evaluatePosition(allinfo.x,allinfo.y,wopen,hopen);
		div$.setSize(wopen,hopen);
		div$.setPosition(allinfo.x,allinfo.y);
	}
};
qw.iframeLoadEvent=function(e)
{
	((e.target)?(e.target):(e.srcElement)).parentNode.removeChild(((e.target)?(e.target):(e.srcElement)).previousSibling);
	((e.target)?(e.target):(e.srcElement)).parentNode.style.backgroundColor="white";
	((e.target)?(e.target):(e.srcElement)).style.display="block";
	window.clearInterval(qw.divinfo[qw.catchId(((e.target)?(e.target):(e.srcElement)))].loadingTime);
	qw.eventListener("remove",(e.target)?(e.target):(e.srcElement),"load",qw.iframeLoadEvent);
};
qw.movingDiv=function(e)
{
	qw.stopAll(e);
	var div$=qw.divimportantinfo.moving;
	div$.setPosition(div$.distancex+e.clientX*1,div$.distancey+e.clientY*1);
};
qw.removeMovingData=function(e)
{
	if((e.button==1&&/(ie)/.test(qw.browser()))||(e.button==0&&!/(ie)/.test(qw.browser())))
	{
		qw.resizeBg();
		qw.eventListener("remove",window,"resize",qw.resizeBg);
		qw.eventListener("remove",window,"keydown",qw.stopAll);
		qw.eventListener("remove",window,"keypress",qw.stopAll);
		qw.eventListener("remove",window,"keyup",qw.stopAll);
		qw.eventListener("remove",document,/(ff|kde)/.test(qw.browser())?"DOMMouseScroll":"mousewheel",qw.stopAll);
		qw.eventListener("remove",document,"mousedown",qw.stopAll);
		qw.eventListener("remove",document,"contextmenu",qw.stopAll);
		qw.eventListener("remove",document,"mousemove",qw.movingDiv);
		qw.eventListener("remove",document,"mouseup",qw.removeMovingData);
		qw.divimportantinfo.moving.testDiv().style.display="none";
		document.body.style.cursor="auto";
		qw.divimportantinfo.moving=null;
	}
};
qw.closingDiv=function(temp,x,y,div$)
{
	var wclose=div$.width/div$.closingpassages*temp;
	var hclose=div$.height/div$.closingpassages*temp;
	var allinfo=qw.centerPosition(parseInt(div$.div().style.left),parseInt(div$.div().style.top),div$.width/div$.closingpassages*(temp+1),div$.height/div$.closingpassages*(temp+1));
	var xclose=allinfo.x+(x-allinfo.x)/temp;
	var yclose=allinfo.y+(y-allinfo.y)/temp;
	allinfo=qw.cornerPosition(xclose,yclose,wclose,hclose);
	if(temp==0)
	{
		window.clearInterval(div$.closing);
		div$.closing=null;
		if(div$.bgvisibility)
		{
			qw.divimportantinfo.scrolling.style.visibility="hidden";
		}
		qw.resizeBg();
		if(qw.divinfo.length==1){document.body.removeChild(qw.divimportantinfo.scrolling);qw.divimportantinfo.scrolling=false;}
		var i=0;
		document.body.removeChild(div$.div());
		for(i=div$.id;i<qw.divinfo.length-1;i++)
		{	
			document.getElementById("qw_number"+(i+1)).id="qw_number"+i;
			qw.divinfo[i+1].id=i;
		}
		
		qw.divinfo=qw.divinfo.slice(0,div$.id).concat(qw.divinfo.slice(div$.id+1,qw.divinfo.length));
		qw.organizezindex();
	}
	else
	{
		div$.setSize(wclose,hclose);
		div$.setPosition(allinfo.x,allinfo.y);
	}
};
/*
BUG 
	konqueror:non carica iframe,sfondo inesatto in dimensione a causa di height
*/